// Mock数据类型定义

// 用户信息
export interface User {
  id: string;
  username: string;
  nickname: string;
  avatar: string;
  bio?: string;
  followersCount: number;
  followingCount: number;
  postsCount: number;
  isFollowing?: boolean;
  createdAt: string;
}

// 营地信息
export interface Campsite {
  id: string;
  name: string;
  description: string;
  images: string[];
  location: {
    latitude: number;
    longitude: number;
    address: string;
    province: string;
    city: string;
  };
  facilities: string[];
  price: {
    min: number;
    max: number;
    unit: string;
  };
  rating: number;
  reviewCount: number;
  tags: string[];
  contact: {
    phone?: string;
    wechat?: string;
  };
  openTime: string;
  createdAt: string;
}

// 帖子/笔记信息
export interface Post {
  id: string;
  title: string;
  content: string;
  images: string[];
  video?: string;
  author: User;
  campsite?: {
    id: string;
    name: string;
  };
  tags: string[];
  likesCount: number;
  commentsCount: number;
  sharesCount: number;
  isLiked: boolean;
  isCollected: boolean;
  createdAt: string;
  updatedAt: string;
}

// 评论信息
export interface Comment {
  id: string;
  content: string;
  author: User;
  postId: string;
  parentId?: string;
  replies?: Comment[];
  likesCount: number;
  isLiked: boolean;
  createdAt: string;
}

// 消息信息
export interface Message {
  id: string;
  type: 'text' | 'image' | 'system';
  content: string;
  sender: User;
  receiver?: User;
  conversationId: string;
  isRead: boolean;
  createdAt: string;
}

// 会话信息
export interface Conversation {
  id: string;
  type: 'private' | 'group' | 'system';
  title: string;
  avatar?: string;
  participants: User[];
  lastMessage?: Message;
  unreadCount: number;
  updatedAt: string;
}

// API响应格式
export interface ApiResponse<T> {
  code: number;
  message: string;
  data: T;
}

// 分页数据格式
export interface PaginatedData<T> {
  list: T[];
  total: number;
  page: number;
  pageSize: number;
  hasMore: boolean;
}

// 搜索结果
export interface SearchResult {
  posts: Post[];
  campsites: Campsite[];
  users: User[];
}